﻿@{
    ViewBag.Title = "Category";
}
@using DirigoEdge.Utils
@model DirigoEdge.Models.ViewModels.CategorySingleViewModel


<div class="module blogCatListing">
    
    @* Breadcrumbs *@
    <div class="breadcrumbsContainer row">
        <div class="twelve columns">
            <ul class="breadcrumbs">
                <li>
                    <a href="/blog/">
                        <span>Blog Home</span>
                    </a>
                </li>
                <li class="current">
                    <a href="/blog/categories/@ContentUtils.GetFormattedUrl(Model.TheCategory.CategoryName)/">
                        <span>@Model.TheCategory.CategoryName</span>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    
    <div class="row">
        <div class="twelve columns">
            <h2 class="title sansserif light">@Model.TheCategory.CategoryName</h2>
        </div>
    </div>
    
    
    <div class="row">
        
        <div class="nine columns blogListing">
        
            @{
                if (Model.BlogsByCat.Count < 1)
                {
                    <p>There are no blogs in this category.</p>
                }
                else
                {
                    // Renders the blog article tags
                    @Html.Partial("/Views/Shared/Partials/BlogArticlePartial.cshtml", Model.BlogsByCat);

                    <a id="LoadMoreBlogs" href="javascript:void(0);" value="Load More" class="secondary loadMore button" data-lastblog="@Model.BlogsByCat.LastOrDefault().BlogId" data-blogCount="@Model.MaxBlogCount">Load More</a>
                }
            }

        </div>

        <div class="three columns categoryBlogListModule">
        
            @* Categories *@
            @Html.Partial("~/Views/Shared/Partials/CategoriesListingPartial.cshtml", new DirigoEdge.Models.ViewModels.BlogsCategoriesViewModel(Model.TheCategory.CategoryName))
        
            @* Latest Blogs / Popular *@
            @Html.Partial("~/Views/Shared/Partials/PopularBlogsPartial.cshtml", new DirigoEdge.Models.ViewModels.BlogPopularViewModel())
        
            @* Archive *@
            @Html.Partial("~/Views/Shared/Partials/BlogArchivePartial.cshtml", new DirigoEdge.Models.ViewModels.BlogArchiveViewModel())

        </div>

    </div>

</div>